package com.example.safeassistan.train.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.example.safeassistan.R;

import java.util.List;


public class TestAmswerCardAdapter extends BaseQuickAdapter<String, BaseViewHolder> {

    public TestAmswerCardAdapter(List<String> data) {
        super(R.layout.item_answer_card, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, String item) {
        if(item!=null&&!item.equals("X")){
            helper.getView(R.id.tvNumber).setBackgroundResource(R.drawable.blue_circle_48);
        }else {
            helper.getView(R.id.tvNumber).setBackgroundResource(R.drawable.gray_circle_48);
        }
        helper.setText(R.id.tvNumber,(helper.getPosition()+1)+"");
    }
}
